<?php
/***************************************************************************
 * 
 * Copyright (c) 2010 , Inc. All Rights Reserved
 * $Id$:BaseProxy.php,2010/05/28 10:34:52 
 * 
 **************************************************************************/
 
 
 
/**
 * @file BaseProxy.php
 * @author huqingping
 * @date 2010/05/28 10:34:52
 * @version 1.0 
 * @brief 
 *  
 **/

interface IIntercepter
{
	function before(IProxy $proxy, $name,$args);
	function after(IProxy $proxy, $name,$args,$ret);
	function exception(IProxy $proxy, $name, $args);
}

interface IProxy 
{
	function getMod();
	function init($conf,$params);
	function call($name,$args);
	function cacheable();
}

abstract class BaseProxy implements IProxy
{
	private $mod = null;

	function __construct($mod)
	{
		$this->mod = $mod;
	}
	//$params为目标类构造函数参数
	//对HTTPRPC/PHP有效
	function init($conf,$params) {}
	function call($name,$args) {return null;}

	function getMod()
	{
		return $this->mod;
	}


	function cacheable()
	{
		return true;
	}

}





/* vim: set ts=4 sw=4 sts=4 tw=100 noet: */
